// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.

import Vue from 'vue';
// 引入element UI
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import App from './App';
// 引入路由
import router from './router';
import sdk from 'abdp.sdk';
import abdpConfig from './config.js'
import axios from 'axios';
import qs from 'qs';
import less from 'less'

// 视频播放
import VueVideoPlayer from 'vue-video-player'
require('video.js/dist/video-js.css')
// require('vue-video-player/src/custom-theme.css')
Vue.use(VueVideoPlayer)
Vue.use(less)
// 引入接口加载进度条
Vue.config.productionTip = false;
// 构建全局Ajax对象
let ajaxManager=new sdk.AjaxManager({BaseUrl:abdpConfig.getApiServerPath(),loginUrl:abdpConfig.getLoginUrlPath()});
Vue.prototype.abdpAjax=ajaxManager;
//设置全局可访问的配置文件对象
Vue.prototype.abdpConfig =abdpConfig;
// axios.defaults.withCredentials=true;
Vue.prototype.$axios = axios;
Vue.prototype.qs=qs;
// 使用element UI
Vue.use(ElementUI);
import store from './store'

/* eslint-disable no-new */
new Vue({
    el: '#app',
    router,
    store,
    components: { App },
    template: '<App/>',
    data: {
        // 空的实例放到根组件下，所有的子组件都能调用
        Bus: new Vue()
    }

})